/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package util;

import java.util.ResourceBundle;
import java.util.logging.Level;
import java.util.logging.Logger;

/**
 *
 * @author hoang.nm
 */
public class DBUtil {

    public static String USER = "root";
    public static String PASS = "root";
    public static String SERVER = "root";
    public static String DB = "root";
    public static String PORT = "root";

    static {
        try {
            read();
        } catch (Exception ex) {
            ex.printStackTrace();
        }
    }
    public static void read() throws Exception {
        ResourceBundle bundle = ResourceBundle.getBundle("resource.db");
        USER = bundle.getString("user");
        PASS = bundle.getString("pass");
        SERVER = bundle.getString("server");
        DB = bundle.getString("db");
        PORT = bundle.getString("port");
    }
    
    public static void write(String user, String pass, String server, String db, String port) throws Exception {
        //
       
    }
}
